# Contributor: Alex Laskin <alex@lask.in>
# Maintainer:  Alex Laskin <alex@lask.in>
pkgname=ddcutil
pkgver=1.2.2
pkgrel=0
pkgdesc="Query and change Linux monitor settings using DDC/CI and USB"
url="https://github.com/rockowitz/ddcutil"
arch="all"
license="GPL-2.0-only"
makedepends="linux-headers autoconf automake libtool eudev-dev libusb-dev i2c-tools-dev
	libxrandr-dev glib-dev kmod-dev"
subpackages="$pkgname-dev $pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/rockowitz/ddcutil/archive/v$pkgver.tar.gz"

prepare() {
	default_prepare
	NOCONFIGURE=1 ./autogen.sh
}

build() {
	./configure \
		--prefix=/usr \
		--mandir=/usr/share/man
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
0329711e536cbcaee2efe6cf981a17181ab318846e9c6a82f2ceacc42691ba49c06df44a52d1f079568e9ccec588cc85d4de4adf19b6db83bebe4bb90ae29207  ddcutil-1.2.2.tar.gz
"
